import {Obj3d} from "../core/obj3d";
import { Material2 } from "./material2";


export class GameItem extends Obj3d{
    constructor(public material:Material2){
        super()
    }

    // 修改材质
    replaceMaterial(newMaterial:Material2){
        if (this.material === newMaterial){
            return;
        }
        this.material.cleanup();
        this.material = newMaterial;
    }
}
